﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>GuiCreate - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The GuiCreate function creates a new Gui object, which is essential for creating and managing a GUI." />
<meta name="ahk:equiv-v1" content="commands/Gui.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css">
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>GuiCreate</h1>
<p>Creates a new <a href="../objects/Gui.htm">Gui object</a>, which is essential for creating and managing a GUI.</p>
<pre class="Syntax">GuiObj := <span class="func">GuiCreate</span>(<span class="optional">Options, Title := <a href="../Variables.htm#ScriptName">A_ScriptName</a>, EventObj</span>)</pre>

<h2 id="Parameters">参数</h2>
<dl>
<dt id="Options">Options</dt><dd>
  <p>类型: <a href="../Concepts.htm#strings">字符串</a></p>
  <p>This parameter can contain any of the options supported by <a href="../objects/Gui.htm#Opt">Gui.Opt</a>.</p>
</dd>
<dt>Title</dt><dd>
  <p>类型: <a href="../Concepts.htm#strings">字符串</a></p>
  <p>The window title. If omitted, it defaults to the current value of <a href="../Variables.htm#ScriptName">A_ScriptName</a>.</p>
</dd>
<dt id="EventObj">EventObj</dt><dd>
  <p>类型: <a href="../Concepts.htm#objects">对象</a></p>
  <p>An "event sink", or object to bind events to. If <em>EventObj</em> is specified, <a href="../objects/GuiOnEvent.htm">OnEvent</a>, OnNotify and OnCommand can be used to register methods of <em>EventObj</em> to be called when an event is raised. If omitted or empty, any string passed to OnEvent's <em>Function</em> parameter is interpreted as a function name.</p>
</dd>
</dl>

<h2 id="Return_Value">返回值</h2>
<p>类型: <a href="../Concepts.htm#objects">对象</a></p>
<p>This function returns a <a href="../Concepts.htm#references-to-objects">reference</a> to a new <a href="../objects/Gui.htm">Gui object</a>. This object provides methods and properties for creating and managing windows, and creating controls.</p>

<h2 id="Related">相关</h2>
<p><a href="../objects/Gui.htm">Gui object</a>, <a href="../objects/GuiControl.htm">GuiControl object</a>, <a href="GuiFromHwnd.htm">GuiFromHwnd</a>, <a href="GuiCtrlFromHwnd.htm">GuiCtrlFromHwnd</a>, <a href="GuiControls.htm">Control Types</a>, <a href="ListView.htm">ListView</a>, <a href="TreeView.htm">TreeView</a>, <a href="../objects/Menu.htm">Menu object</a>, <a href="Control.htm">Control functions</a>, <a href="MsgBox.htm">MsgBox</a>, <a href="FileSelect.htm">FileSelect</a>, <a href="DirSelect.htm">DirSelect</a></p>

</body>
</html>